package face.pay.cpn.card.api;

import face.pay.cpn.card.service.IGetCpnCardService;
import face.pay.cpn.utils.response.ResponseMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 领取优惠券接口
 */
@RestController
@RequestMapping("/cpn_card")
@Slf4j
public class ApiGetCpnCard  {

    @Autowired
    IGetCpnCardService iGetCpnCardService;

    /**
     * 领取优惠券
     * 返回优惠券兑换链接
     * @return
     */
    @RequestMapping("/get")
    public ResponseMessage getCpnCard( @RequestBody String info){
        log.error("获取优惠券接口 报文："+info);
        return  iGetCpnCardService.getCpnCard(info);
    }



}
